# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Calendar.V3.Model.CalendarList do
  @moduledoc """


  ## Attributes

  *   `etag` (*type:* `String.t`, *default:* `nil`) - ETag of the collection.
  *   `items` (*type:* `list(GoogleApi.Calendar.V3.Model.CalendarListEntry.t)`, *default:* `nil`) - Calendars that are present on the user's calendar list.
  *   `kind` (*type:* `String.t`, *default:* `calendar#calendarList`) - Type of the collection ("calendar#calendarList").
  *   `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided.
  *   `nextSyncToken` (*type:* `String.t`, *default:* `nil`) - Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :etag => String.t() | nil,
          :items => list(GoogleApi.Calendar.V3.Model.CalendarListEntry.t()) | nil,
          :kind => String.t() | nil,
          :nextPageToken => String.t() | nil,
          :nextSyncToken => String.t() | nil
        }

  field(:etag)
  field(:items, as: GoogleApi.Calendar.V3.Model.CalendarListEntry, type: :list)
  field(:kind)
  field(:nextPageToken)
  field(:nextSyncToken)
end

defimpl Poison.Decoder, for: GoogleApi.Calendar.V3.Model.CalendarList do
  def decode(value, options) do
    GoogleApi.Calendar.V3.Model.CalendarList.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Calendar.V3.Model.CalendarList do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
